package cn.wolfcode.qo;

import cn.wolfcode.domain.Question;
import lombok.Data;

import java.util.List;
@Data
public class PageResult{
    private List<Question> oneQuestions;//单选题
    private Integer oneCount; //单选总分
    private List<Question> twoQuestions;//多选题
    private Integer twoCount;//多选总分
    private List<Question> tfQuestions;//判断题
    private Integer tfCount; //判断总分
    private Integer oneTypeCount;//单选分数
    private Integer twoTypeCount;//多选分数
    private Integer tfTypeCount;//判断分数

    public PageResult(List<Question> oneQuestions, List<Question> twoQuestions,List<Question> tfQuestions,ExamQueryObject qo) {
        this.oneQuestions = oneQuestions;

        this.twoQuestions = twoQuestions;

        this.tfQuestions = tfQuestions;

        this.oneTypeCount = qo.getOneScore();
        this.twoTypeCount = qo.getTwoScore();
        this.tfTypeCount = qo.getTFScore();
        this.oneCount = qo.getOneScore()*oneTypeCount;
        this.twoCount =qo.getTwoScore()*twoTypeCount;
        this.tfCount = qo.getTFScore()*tfTypeCount;
    }
}
